// =====================================================================
//
//  This file is part of the Microsoft Dynamics CRM SDK code samples.
//
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//
//  This source code is intended only as a supplement to Microsoft
//  Development Tools and/or on-line documentation.  See these other
//  materials for detailed information regarding Microsoft code samples.
//
//  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//
// =====================================================================


namespace Microsoft.Crm.Sdk
{
	/// <summary>
	/// Values for InheritenaceMask attribute of BusinessUnit
	/// </summary>
	public static class BusinessUnitInheritanceMask
	{
		public const int InheritNone = 0;
		public const int InheritProcessTemplate = 1;
		public const int InheritEmailTemplate = 2;
		public const int InheritReferralSource = 4;
		public const int InheritCompetitor = 8;
		public const int InheritSalesProcess = 16;
		public const int MustInheritProcessTemplate = 32;
		public const int MustInheritEmailTemplate = 64;
		public const int MustInheritReferralSource = 128;
		public const int MustInheritCompetitor = 256;
		public const int MustInheritSalesProcess = 512;
		public const int InheritAll = 1023;
	}

	/// <summary>
	/// ExtentCode values for CalendarRule
	/// </summary>
	public static class CalendarRuleExtentCode
	{
		public const int Transparent = 0;
		public const int SubtractRecurrenceIntervals = 1;
		public const int SubtractResults = 2;
	}

	/// <summary>
	/// MemberType values for List
	/// </summary>
	public static class ListMemberType
	{
		public const int Account = 1;
		public const int Contact = 2;
		public const int Lead = 4;
	}

	/// <summary>
	/// FiscalYearDisplayCode values for Organization
	/// </summary>
	public static class OrganizationFiscalYearDisplayCode
	{
		public const int UseStartDate = 1;
		public const int UseEndDate = 2;
	}

	/// <summary>
	/// QueryType for SavedQuery
	/// </summary>
	public static class SavedQueryQueryType
	{
		public const int MainApplicationView = 0;
		public const int AdvancedSearch = 1;
		public const int SubGrid = 2;
		public const int QuickFindSearch = 4;
		public const int Reporting = 8;
		public const int OfflineFilters = 16;
		//public const int MASearch = 32; // not supported post v4
		public const int LookupView = 64;
		public const int SMAppointmentBookView = 128;
		public const int OutlookFilters = 256;
		public const int AddressBookFilters = 512;
		public const int MainApplicationViewWithoutSubject = 1024;
		public const int SavedQueryTypeOther = 2048;
		public const int InteractiveWorkflowView = 4096;
		public const int OfflineTemplate = 8192;
		public const int OutlookTemplate = 131072;
		public const int CustomDefinedView = 16384;
	}

	/// <summary>
	/// Availability values for SdkMessage
	/// </summary>
	public static class SdkMessageAvailability
	{
		public const int Server = 0;
		public const int Client = 1;
		public const int All = 2;
	}

	/// <summary>
	/// Availability values for SdkMessageFilter
	/// </summary>
	public static class SdkMessageFilterAvailability
	{
		public const int Server = SdkMessageAvailability.Server;
		public const int Client = SdkMessageAvailability.Client;
		public const int All = SdkMessageAvailability.All;
	}

	/// <summary>
	/// SubscriptionType values for Subscription
	/// </summary>
	public static class SubscriptionSubscriptionType
	{
		public const int Offline = 0;
		public const int Outlook = 1;
		public const int AddressBookProvider = 2;
	}

	/// <summary>
	/// GenerationTypeCode for Template
	/// </summary>
	public static class TemplateGenerationTypeCode
	{
		public const int BulkDupDetectCompleted = 1;
		public const int BulkDeleteCompleted = 2;
		public const int BulkDeleteCompletedWithFailures = 3;
		public const int BulkDeleteFailed = 4;
		public const int ImportCompleted = 5;
		public const int ImportFailed = 6;
	}

	/// <summary>
	/// QueryType for UserQuery
	/// </summary>
	public static class UserQueryQueryType
	{
		public const int MainApplicationView = SavedQueryQueryType.MainApplicationView;
		public const int AdvancedSearch = SavedQueryQueryType.AdvancedSearch;
		public const int SubGrid = SavedQueryQueryType.SubGrid;
		public const int QuickFindSearch = SavedQueryQueryType.QuickFindSearch;
		public const int Reporting = SavedQueryQueryType.Reporting;
		public const int OfflineFilters = SavedQueryQueryType.OfflineFilters;
		//public const int MASearch = SavedQueryQueryType.MASearch; // not supported post v4
		public const int LookupView = SavedQueryQueryType.LookupView;
		public const int SMAppointmentBookView = SavedQueryQueryType.SMAppointmentBookView;
		public const int OutlookFilters = SavedQueryQueryType.OutlookFilters;
		public const int AddressBookFilters = SavedQueryQueryType.AddressBookFilters;
		public const int MainApplicationViewWithoutSubject = SavedQueryQueryType.MainApplicationViewWithoutSubject;
		public const int SavedQueryTypeOther = SavedQueryQueryType.SavedQueryTypeOther;
		public const int InteractiveWorkflowView = SavedQueryQueryType.InteractiveWorkflowView;
		public const int CustomDefinedView = SavedQueryQueryType.CustomDefinedView;
	}

	/// <summary>
	/// AdvancedFindStartupMode for UserSettings
	/// </summary>
	public static class UserSettingsAdvancedFindStartupMode
	{
		public const int Simple = 1;
		public const int Detailed = 2;
	}

	/// <summary>
	/// DefaultCalendarView for UserSettings
	/// </summary>
	public static class UserSettingsDefaultCalendarView
	{
		public const int Day = 0;
		public const int Week = 1;
		public const int Month = 2;
	}

	/// <summary>
	/// FullNameConventionCode for UserSettings
	/// </summary>
	public static class UserSettingsFullNameConventionCode
	{
		public const int LastFirst = 0;
		public const int FirstLast = 1;
		public const int LastFirstMiddleInitial = 2;
		public const int FirstMiddleInitialLast = 3;
		public const int LastFirstMiddle = 4;
		public const int FirstMiddleLast = 5;
		public const int LastSpaceFirst = 6;
		public const int LastNoSpaceFirst = 7;
	}
}
